{% extends 'html/base_template.html' %}
{% load filter %}
{% load static %}
{% block content_section %}
    <div class="row">
        <div class="col-sm-12">
            <div class="panel panel-default">
                <div class="panel-body">
                    <table class="table table-bordered table-striped" id="example-1">
                        <thead>
                        <tr>
                            <th>产品名称</th>
                            <th>提交时间</th>
                            <th>版本号</th>
                            <th>版本名称</th>
                            <th>游戏包名</th>
                            <th>产品包下载</th>
                        </tr>
                        </thead>
                        <tbody class="middle-align">
                        <tr>
                            <td>{{ game1.descriptor.name }}</td>
                            <td>{{ game1.stime }}</td>
                            <td>{{ game1.version_no }}</td>
                            <td>{{ game1.version_name }}</td>
                            <td>{{ game1.apk.name|filename }}</td>
                            <td>
                                <a href="{{ game1.apk.name|download_url }}"
                                   class="btn btn-secondary btn-sm btn-icon">下载</a>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
                <form role="form" class="form-horizontal">
                    <ul class="nav nav-tabs my_nav-tabs">
                        <li class="active">
                            <a href="#home" data-toggle="tab">更新说明</a>
                        </li>
                        <li>
                            <a href="#profile" data-toggle="tab">游戏信息</a>
                        </li>
                    </ul>
                    <div class="tab-content tab-content_01">
                        <div class="tab-pane active" id="home">
                            <div class="panel-body">
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><i class="cl_red">*</i>游戏名称</label>
                                    <div class="col-sm-10">
                                        <div class="inp_val">{{ game1.descriptor.name }}</div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><i class="cl_red">*</i>游戏包</label>
                                    <div class="col-sm-10">
                                        <div class="inp_val">{{ game1.apk.name|filename }}</div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><i class="cl_red">*</i>版本号</label>
                                    <div class="col-sm-10">
                                        <div class="inp_val">{{ game1.version_no }}</div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><i class="cl_red">*</i>更新说明</label>
                                    <div class="col-sm-10">
                                        <div class="inp_val">街机支持PNG格式，重新上传将替换旧图标，请上传190江湖</div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><i class="cl_red">*</i>发布时间</label>
                                    <div class="col-sm-10">
                                        <div class="inp_val"><span
                                                class="btn btn-info btn-sm btn-icon icon-left">立即发布</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="panel-body">
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">游戏ICON</label>
                                    <div class="col-sm-10">
                                        <div class="upload_img w_80">
                                            <img src="{{ game1.img_icon|download_url }}">
                                        </div>
                                        <a href="#">点击查看大图</a>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">游戏封面</label>
                                    <div class="col-sm-10">
                                        <div class="upload_img w_105">
                                            <img src="{{ game1.img_cover|download_url }}">
                                        </div>
                                        <a href="#">点击查看大图</a>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">游戏宣传图</label>
                                    <div class="col-sm-10">
                                        <div class="upload_img w_142">
                                            <img src="{{ game1.img_poster|download_url }}">
                                        </div>
                                        <a href="#">点击查看大图</a>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">游戏截图</label>
                                    <div class="col-sm-10">
                                        <div class="upload_img w_142">
                                            <img src="images/img_icon04.png"><img
                                                src="images/img_icon04.png"><img
                                                src="images/img_icon04.png"><img
                                                src="images/img_icon04.png"><img
                                                src="images/img_icon04.png">
                                        </div>
                                        <a href="#">点击查看大图</a>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">游戏介绍</label>
                                    <div class="col-sm-10">
                                        <div class="inp_val">{{ game1.description }}</div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="tab-pane" id="profile">
                            <div class="panel-body">
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><i class="cl_red">*</i>公司名称</label>
                                    <div class="col-sm-10">
                                        <div class="inp_val">{{ game2.descriptor.company }}</div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><i class="cl_red">*</i>游戏题材及IP</label>
                                    <div class="col-sm-10">
                                        <div class="inp_val">{{ game2.descriptor.subject }}</div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><i class="cl_red">*</i>游戏基础分类</label>
                                    <div class="col-sm-10">
                                        {% for key,val in GameType.Types %}
                                            {% if key == game2.descriptor.type %}
                                                <div class="inp_val"><span
                                                        class="btn btn-info btn-sm btn-icon icon-left">{{ val }}</span>
                                                </div>
                                            {% endif %}
                                        {% endfor %}
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><i class="cl_red">*</i>资费模式</label>
                                    <div class="col-sm-10">
                                        {% for key,val in GamePayMode.PayModes %}
                                            {% if key == game2.descriptor.paymode %}
                                                <div class="inp_val"><span
                                                        class="btn btn-info btn-sm btn-icon icon-left">{{ val }}</span>
                                                </div>
                                            {% endif %}
                                        {% endfor %}
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><i class="cl_red">*</i>操作方式</label>
                                    <div class="col-sm-10">
                                        {% load filter %}
                                        {% for key,val in GameOperationMode.OpModes %}
                                            {% if key|bits_and:game2.descriptor.opmodes.0 %}
                                                <div class="inp_val"><span
                                                        class="btn btn-info btn-sm btn-icon icon-left">{{ val }}</span>
                                                </div>
                                            {% endif %}
                                        {% endfor %}
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><i class="cl_red">*</i>游戏品类</label>
                                    <div class="col-sm-10">
                                        {% for key, val in GameCategory.Categories %}
                                            {% if key == game2.descriptor.category %}
                                                <div class="inp_val"><span
                                                        class="btn btn-info btn-sm btn-icon icon-left">{{ val }}</span>
                                                </div>
                                            {% endif %}
                                        {% endfor %}
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><i class="cl_red">*</i>游戏风格</label>
                                    <div class="col-sm-10">
                                        {% for key,val in GameStyle.Styles %}
                                            {% if key|bits_and:game2.descriptor.styles.0 %}
                                                <div class="inp_val"><span
                                                        class="btn btn-info btn-sm btn-icon icon-left">{{ val }}</span>
                                                </div>
                                            {% endif %}
                                        {% endfor %}
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><i class="cl_red">*</i>游戏介绍</label>
                                    <div class="col-sm-10">
                                        <div class="inp_val">{{ game2.description }}</div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><i class="cl_red">*</i>发布时间</label>
                                    <div class="col-sm-10">
                                        <div class="inp_val"><span
                                                class="btn btn-info btn-sm btn-icon icon-left">立即发布</span>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><i class="cl_red">*</i>游戏ICON</label>
                                    <div class="col-sm-10">
                                        <div class="upload_img w_80">
                                            <img src="{{ game2.img_icon|download_url }}">
                                        </div>
                                        <a href="#">点击查看大图</a>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><i class="cl_red">*</i>游戏封面</label>
                                    <div class="col-sm-10">
                                        <div class="upload_img w_105">
                                            <img src="{{ game2.img_cover|download_url }}">
                                        </div>
                                        <a href="#">点击查看大图</a>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><i class="cl_red">*</i>游戏宣传图</label>
                                    <div class="col-sm-10">
                                        <div class="upload_img w_142">
                                            <img src="{{ game2.img_poster|download_url }}">
                                        </div>
                                        <a href="#">点击查看大图</a>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><i class="cl_red">*</i>游戏截图</label>
                                    <div class="col-sm-10">
                                        <div class="upload_img w_142">
                                            <img src="images/img_icon04.png"><img
                                                src="images/img_icon04.png"><img
                                                src="images/img_icon04.png"><img
                                                src="images/img_icon04.png"><img
                                                src="images/img_icon04.png">
                                        </div>
                                        <a href="#">点击查看大图</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="panel-heading">
                        <h3 class="panel-title">版权认证</h3>
                    </div>
                    <div class="panel-body">
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><i
                                    class="cl_red">*</i>软件著作权证书</label>
                            <div class="upload_img w_142">
                                <img src="{{ game1.descriptor.ca_copyright|download_url }}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><i
                                    class="cl_red">*</i>与玩吧合作授权书</label>
                            <div class="upload_img w_142">
                                <img src="{{ game1.descriptor.ca_agreement|download_url }}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">代理授权书</label>
                            <div class="upload_img w_142">
                                <img src="{{ game1.descriptor.ca_agency|download_url }}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">其他补充材料</label>
                            <div class="upload_img w_142">
                                <img src="{{ game1.descriptor.ca_others|download_url }}">
                            </div>
                        </div>
                    </div>
                    <div class="panel-heading">
                        <h3 class="panel-title">审核记录</h3>
                    </div>
                    <table class="table table-bordered table-striped" id="example-2"
                           style="margin-top:20px;">
                        <thead>
                        <tr>
                            <th>操作</th>
{#                            <th>提交</th>#}
{#                            <th>初审</th>#}
{#                            <th>复审</th>#}
                            <th>操作人</th>
                            <td>操作时间</td>
                            <td>操作结果</td>
                            <td>-</td>

                        </tr>
                        </thead>
                        <tbody class="middle-align">
                        <tr>
                            <th>提交</th>
                            <td>{{ game1.user.account }}</td>
                            <td>{{ game1.stime }}</td>
                            <td>提交成功</td>
                        </tr>
                        <tr>
                            <th>初审</th>
                            <td>{{ game1|first_trial_game:"auditor" }}</td>
                            <td>{{ game1|first_trial_game:"time" }}</td>
                            <td>{{ game1|first_trial_game:"status" }}</td>
                        </tr>
                        <tr>
                            <th>复审</th>
                            <td>{{ game1|review_game:"auditor" }}</td>
                            <td>{{ game1|review_game:"time" }}</td>
                            <td>{{ game1|review_game:"status" }}</td>
                        </tr>
                        </tbody>
                    </table>
                </form>
            </div>
        </div>
    </div>
{% endblock %}